<template>
	<!--首页-->
	<div id="insitute-menu-style">
		<div v-if="loginShow" class="header">
			<div class="header-boxs">
				<span class="fl">欢迎您，这里是西南大学-新农村发展研究院！</span>
				<span class="fr">
					<router-link to='/login'>
						<span class="login">登录 </span>
				</router-link>
				|
				<router-link to='/registered'>
					<span class="login">注册</span>
				</router-link>
				</span>
			</div>
		</div>
		<div id="insitute-menu">
			<img src="../../images/home/logo.png" class="logo-img fl" @click="gotoIndex">
			<ul class="example menu-ul fr">
				<li :class="[{activeA:fatherIndex==index}]" v-for="(item,index)  in items" :key="item.id" @click="showToggle(index,item)">
					<p>{{item.name}}</p>
					<ul class="subItems-list" v-if="fatherIndex==index">
						<!--阻止冒泡@click.stop-->
						<li v-for="(subItem,inds) in item.subItems" @click.stop="clickChild(inds,subItem)" :class="[{activeA:childIndex==inds}]">
							<span>{{subItem.name}}</span>
						</li>
					</ul>
				</li>
				<li v-if="userShow" class="nav-right">
					<div class="header-nav-right fr">
						<div class="mormal-right fr">
							<div class="wkp-right fr">
								<div class="fr" @click="showUl()" @mouseleave="leaveDiv()">
									<div class="user-box">
										<img class="user-img fl" src="../../images/PortalThemes/user.png" id="headImg" />
										<span class="user-name fr">{{requrstData.userInfo.userName}}</span>
									</div>
									<template class="userBox">
										<ul class="user-list">
											<img class="sanjiao" src="../../images/PortalThemes/san.png" />
											<li class="xian">
												<a @click="goManagementCenter()">
													<span class="img-bg"></span>
													<span>管理中心</span>
												</a>
											</li>
											<!--				<li class="xian">
												<router-link to='/userList'>
													<a>
														<span class="img-bg1"></span>
														<span>用户管理</span>
													</a>
												</router-link>
											</li>-->
											<li @click="logOut">
												<a>
													<span class="img-bg4"></span>
													<span>退出登录</span>
												</a>
											</li>

										</ul>
									</template>

								</div>
							</div>

						</div>

					</div>

				</li>

			</ul>
		</div>
		<div class="banner">
			<div class="banner-box">
				<img class="img1" :src="urls.baseUrl + portalMainImgUrl" />
				<img class="img2" :src="urls.baseUrl + portalSecondImgUrl" />
			</div>
			<div class="training-enrolment">
				<img src="../../images/index/training-enrolment.png" @click="toLoginTraining()">
				<img src="../../images/index/delete.png" class="delete-training"  @click="closeTraining()">
			</div>
			<div class="location-box">
				<!--内容块-->
				<div class="List-box">
					<!--工作动态-->
					<div class="DynamicBox new-infomation-content">
						<!--工作动态-->
						<div class="location">
							<div class="location-text fl">
								<img class="location-img fl" src="../../images/home/xinwen.png" />
								<p class="fr">工作动态</p>
							</div>
							<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
							<router-link :to="{path:'/home',query:{fatherIndex:fatherIndex}}">
								<a class="More-and-more">更多&gt;&gt;</a>
							</router-link>
						</div>
						<div v-if="!workDynamicList.length" class=nothing-data>暂无工作动态数据！</div>
						<div v-for="workDynamic in workDynamicList" @click="WorkingDynamicDetails(workDynamic.uuid)" class="after cursor">
							<div class="img-div fl">
								<img :src="urls.baseUrl + workDynamic.coverUrl">
							</div>
							<div class="article-single fl">
								<p class="title">
									<i class="yuan"></i>
									<span class="content-title" :title="workDynamic.name">{{workDynamic.name}}</span>
									<span class="fr time-style">{{formatData(workDynamic.createAt)}}</span>
								</p>
								<div class="content navDynamic" v-html="filterSrcContentLabel(workDynamic.content)"></div>
							</div>
						</div>
					</div>
					<!--新闻通知-->
					<div class="NewBox">
						<!--新闻通知-->
						<div class="location">
							<div class="location-text fl">
								<img class="location-img fl" src="../../images/home/gonggao.png" />
								<p class="fr">通知公告</p>
							</div>
							<router-link :to="{path:'/dynamicWorkList',query:{fatherIndex:fatherIndex}}">
								<a class="More-and-more">更多&gt;&gt;</a>
							</router-link>
							<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
						</div>
						<div v-if="!announcementList.length" class=nothing-data>暂无通知公告数据！</div>
						<ul class="new-list">
							<li v-for="(announcement,index) in announcementList" @click="ResultsNavBox(announcement.uuid)" class="NewNavBox cursor" v-if="index<7">
								<span class="fl show-oneline" :title="announcement.name"><i class="yuan"></i>{{announcement.name}}</span>
								<span class="fr time-style"> {{formatData(announcement.createAt)}}</span>
							</li>
						</ul>

					</div>
				</div>
				<div class="after common-margin">
					<!--成果展示-->
					<div class="Results fl">
						<div class="location ">
							<div class="location-text fl">
								<img class="location-img fl" src="../../images/home/chengguo.png" />
								<p class="fr">成果展示</p>
							</div>
							<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
							<!--<router-link to='/ResultsShow'>
								<a class="More-and-more">更多&gt;&gt;</a>
							</router-link>-->
              <a class="More-and-more" @click="tempMsgTips">更多&gt;&gt;</a>
						</div>
						<div v-if="!achievementList.length" class=nothing-data>暂无成果展示数据！</div>
						<ul class="Results-list">
							<li v-for="achievement in achievementList" @click="resultsDetails(achievement.uuid)" class="ResultsNavBox after cursor">
								<span class="fl"><i class="yuan"></i>{{achievement.name}}</span>
								<span class="fr time-style">{{formatData(achievement.createAt)}}</span>
							</li>
						</ul>
					</div>
					<!--简报展示-->
					<div class="Training fl">
						<div class="location ">
							<div class="location-text fl">
								<img class="location-img fl" src="../../images/home/briefing.png" />
								<p class="fr">工作简报</p>
							</div>
							<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
							<router-link :to="{path:'/workBriefing',query:{fatherIndex:fatherIndex}}">
								<a class="More-and-more">更多&gt;&gt;</a>
							</router-link>
						</div>
						<div v-if="!briefingList.length" class=nothing-data>暂无简报展示数据！</div>
						<ul class="Results-list">
							<li v-for="briefing in briefingList" @click="resultsDetails(briefing.uuid)" class="ResultsNavBox after cursor">
								<span class="fl show-oneline" :title="briefing.name"><i class="yuan"></i>{{briefing.name}}</span>
								<span class="fr time-style">{{formatData(briefing.createAt)}}</span>
							</li>
						</ul>
					</div>
					<!--&lt;!&ndash;培训报名&ndash;&gt;
					<div class="Training fl cursor">
						<router-link to='/TheTraining'>
							<img src="../../images/home/biaoming.png" />
						</router-link>
					</div>-->
				</div>
				<!--基地展示-->
				<div class="Base-show-box common-margin">
					<div class="location ">
						<div class="location-text fl">
							<img class="location-img fl" src="../../images/home/zhanshi.png" />
							<p class="fr">基地展示</p>
						</div>
						<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
						<router-link :to="{path:'/baseShow',query:{fatherIndex:fatherIndex}}">
							<a class="More-and-more">更多&gt;&gt;</a>
						</router-link>

					</div>

					<div class="Base-show">
						<div v-if="!baseData.length" class=nothing-data>暂无基地展示数据！</div>
						<div @click="baseDetails(base.id)" class="Base-one cursor" v-for="base in baseData">
							<img :src="thatUrl + base.picture" />
							<p class=" show-oneline" :title="base.name">{{base.name}}</p>
						</div>

					</div>
				</div>
				<!--联系我们-->
				<div class="Contact-us-box common-margin">
					<div class="location after">
						<div class="location-text fl">
							<img class="location-img fl" src="../../images/home/xianxi.png" />
							<p class="fr">联系我们</p>
						</div>
						<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
					</div>
					<div class="Contact-us after">
						<div class="Contact-one">
							<div class="Contact-img">
								<img src="../../images/home/xianxiwomen.png" />
							</div>
							<div class="Contact-text Customer-service">
								<p>客服电话</p>
								<p>023-68254903</p>
							</div>
						</div>
						<div class="Contact-two">
							<div class="Contact-img">
								<img src="../../images/home/ypuxiang.png" />
							</div>
							<div class="Contact-text">
								<p>联系邮箱</p>
								<p>1508792475@qq.com</p>
							</div>
						</div>
						<div class="Contact-three">
							<textarea v-model="mailContent" placeholder="问题反馈" style="resize:none"></textarea>
							<input type="button" value="反馈" @click="sendMail" class="cursor" />
						</div>
					</div>
				</div>

			</div>
		</div>
		<!--友情链接-->
		<div class="link-box">
			<div class="link">
				<img class="link-img" src="../../images/PortalThemes/link.png" />
				<span>友情链接：
					<a v-for="portalConfig in portalConfigList" target="_blank" :href="portalConfig.url"> {{portalConfig.name}} |</a>
					<!--用户入口：
					<a>旅游规划</a>|
					<a>旅游策划</a>|
					<a>旅游地产</a>|
					<a>全域旅游</a>|
					<a>特色小镇</a>|
					<a>乡村旅游</a>|
					<a>田园综合体</a>|
					<a>温泉规划</a>|
					<a>景区规划</a>|
					<a>旅游小镇</a>|
					<a>主题公园</a>|
					<a>旅游招商</a>|
					<a>旅发网</a>-->
				</span>
			</div>
		</div>
		<div class="footer">
			<p class="center">Copyright© 2019 西南大学新农村发展研究院　All rights reserved. 网站备案号：（渝ICP 06005063号-4） 站长信箱：ADMIN@CRIC.CN</p>
		</div>
	</div>

</template>

<script src="./index.js"></script>

<style scoped>
	@import "index.css";
</style>
